<?php
/**
 * Created by PhpStorm.
 * User: hebidu
 * Date: 2017-08-11
 * Time: 14:53
 */

namespace app\domain;



use app\src\sunsun\server\action\SServerClientAction;

class SunsunSServerDomain extends BaseDomain
{

    public function clientCountByGroup(){
        $group = $this->_post('group','');
        $data = [
            'all_client_cnt'=>(new SServerClientAction())->allClientCountByGroup($group)
        ];
        $result = ['status'=>true,'info'=>$data];
        $this->exitWhenError($result,true);
    }
    public function clientCount(){
        $data = [
            'all_client_cnt'=>(new SServerClientAction())->allClientCount()
        ];
        $result = ['status'=>true,'info'=>$data];
        $this->exitWhenError($result,true);
    }

    public function sessionInfo(){
        $did = $this->_post('did','');
        $data =  (new SServerClientAction())->getSession($did);
        $result = ['status'=>true,'info'=>$data];
        $this->exitWhenError($result,true);
    }
}